package com.itbaima.csmall.stock.webapi.quartz.kafka;

// import com.google.gson.Gson;
// import com.itbaima.csmall.commons.pojo.stock.entity.Stock;
// import com.itbaima.csmall.stock.webapi.quartz.kafka.KafkaJob;
import lombok.extern.slf4j.Slf4j;
// import org.apache.kafka.clients.consumer.ConsumerRecord;
// import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.stereotype.Component;

/**
 * <p>KafkaConsumer</p>
 *
 * @author Chen
 * @since 2023/3/8 14:19:19
 */
@Slf4j
@Component
public class KafkaConsumer {

    // @KafkaListener(topics = KafkaJob.TOPIC_STOCK_KEY)
    // public void received(ConsumerRecord<String, String> record) {
    //     String json = record.value();
    //     Gson gson = new Gson();
    //     Stock stock = gson.fromJson(json, Stock.class);
    //     log.info("接收到消息：{}", stock);
    // }

}
